unit UnQryLxMx;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, dxGDIPlusClasses, Vcl.Mask, RzEdit, Vcl.StdCtrls;

type
  TFrmQryLxMx = class(TForm)
    Image1: TImage;
    imgCancel: TImage;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    mmShiT: TRzMemo;
    edtXm: TRzEdit;
    edtBh: TRzEdit;
    edtsResult: TRzEdit;
    edtCreateTime: TRzEdit;
    edtGh: TRzEdit;
    edtTiX: TRzEdit;
    edttResult: TRzEdit;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormDestroy(Sender: TObject);
    procedure imgCancelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    procedure imgCancelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
    procedure imgCancelClick(Sender: TObject);
    procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmQryLxMx: TFrmQryLxMx;

implementation

{$R *.dfm}

uses UnMain;

procedure TFrmQryLxMx.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TFrmQryLxMx.FormCreate(Sender: TObject);
begin
  FrmQryLxMx := self;
  FrmMain.SetFormMonitor(FrmQryLxMx,FrmMain.screenNum);
end;

procedure TFrmQryLxMx.FormDestroy(Sender: TObject);
begin
  FrmQryLxMx := nil;
end;

procedure TFrmQryLxMx.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  ReleaseCapture;
  SendMessage(Handle, WM_SYSCOMMAND, $F012, 0);
end;

procedure TFrmQryLxMx.imgCancelClick(Sender: TObject);
begin
  Close;
end;

procedure TFrmQryLxMx.imgCancelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  img:TImage;
begin
  img:=TImage(Sender);
  img.Left:=img.Left+1;
  img.top:=img.top+1;
end;

procedure TFrmQryLxMx.imgCancelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  img:TImage;
begin
  img:=TImage(Sender);
  img.Left:=img.Left-1;
  img.top:=img.top-1;
end;
end.
